import Vue from "vue";
import router from "../../router/index.js";
Vue.prototype.$goBack = function (params) {
  let options = {
    num: -1,
    direction: "left",
    isBack: true
  };
  Object.assign(options, params);
  router.direction = options.direction;
  router.isBack = options.isBack;
  router.go(options.num);
};
Vue.prototype.$goTo = function (params, obj) {
  let options = {
    direction: "right",
    isBack: false
  };
  obj;
  Object.assign(options, params);
  router.direction = options.direction;
  router.isBack = options.isBack;
  router.push(params);
};